X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=blobdiff_plain;f=lib%2Fwhenexpr.mli;h=c84f0919631dba572bf6770428b9b142c658340b;hp=818c75dbbee9ae4a642ead73949159316a587c13;hb=9f7c94086330deb1c6dc0c51355a60b19ff78055;hpb=0c9faf57f9239b0fe1c0b46353d222bb4cf5cd74 diff --git a/lib/whenexpr.mli b/lib/whenexpr.mli index 818c75d..c84f091 100644 --- a/lib/whenexpr.mli +++ b/lib/whenexpr.mli @@ -33,6 +33,7 @@ type whenexpr = | Expr_eq of whenexpr * whenexpr (** == *) | Expr_ge of whenexpr * whenexpr (** >= *) | Expr_gt of whenexpr * whenexpr (** > *) + | Expr_ne of whenexpr * whenexpr (** != *) | Expr_not of whenexpr (** boolean not *) | Expr_add of whenexpr * whenexpr (** arithmetic addition or string cat *) | Expr_sub of whenexpr * whenexpr (** arithmetic subtraction *) @@ -60,9 +61,33 @@ type shell_script = { } (** A shell script. *) +type variable = + | T_unit + | T_bool of bool + | T_string of string + | T_int of Big_int.big_int + | T_float of float +(** Typed variable (see also [whenproto.x]) *) + +val string_of_variable : variable -> string + +val variable_of_rpc : Whenproto_aux.variable -> variable +val rpc_of_variable : variable -> Whenproto_aux.variable + +type variables = variable Whenutils.StringMap.t +(** A set of variables. *) + type preinfo = { pi_job_name : string; (** Job name. *) pi_serial : Big_int.big_int; (** Job serial number. *) + pi_variables : (string * variable) list; (** Variables set in job. *) + pi_running : preinfo_running_job list; (** List of running jobs. *) +} +and preinfo_running_job = { + pirun_job_name : string; (** Running job name. *) + pirun_serial : Big_int.big_int; (** Running job serial number. *) + pirun_start_time : float; (** Running job start time. *) + pirun_pid : int; (** Running job process ID. *) } (** Information available to pre function before the job runs. *) @@ -80,22 +105,6 @@ type pre = preinfo -> bool type post = result -> unit (** Pre and post functions. *) -type variable = - | T_unit - | T_bool of bool - | T_string of string - | T_int of Big_int.big_int - | T_float of float -(** Typed variable (see also [whenproto.x]) *) - -val string_of_variable : variable -> string - -val variable_of_rpc : Whenproto_aux.variable -> variable -val rpc_of_variable : variable -> Whenproto_aux.variable - -type variables = variable Whenutils.StringMap.t -(** A set of variables. *) - type job_cond = | When_job of whenexpr (** when ... : << >> *) | Every_job of periodexpr (** every ... : << >> *)