globus_sch...erator_api(3)

πŸ“¦ version 6.6, in ubuntu stonking

πŸ’– globus_scheduler_event_generator_api πŸ’–

okay bestie, welcome to the globus_scheduler_event_generator_api page from the Library Functions Manual β€” this is the whole Scheduler Implementation API, and yes we are reading all of it, no skimming, periodt. ✨

It's literally just: Scheduler Implementation API. That's the vibe. 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

🌈 Enumerations

enum globus_scheduler_event_generator_error_t {
    GLOBUS_SEG_ERROR_TYPE_NULL = 1024,
    GLOBUS_SEG_ERROR_TYPE_ALREADY_SET,
    GLOBUS_SEG_ERROR_TYPE_INVALID_MODULE,
    GLOBUS_SEG_ERROR_TYPE_INVALID_FORMAT,
    GLOBUS_SEG_ERROR_TYPE_OUT_OF_MEMORY,
    GLOBUS_SEG_ERROR_TYPE_LOADING_MODULE }

πŸŽ€ Functions

globus_result_t globus_scheduler_event (const char *format,...)
globus_result_t globus_scheduler_event_pending (time_t timestamp, const
    char *jobid)
globus_result_t globus_scheduler_event_active (time_t timestamp, const
    char *jobid)
globus_result_t globus_scheduler_event_failed (time_t timestamp, const
    char *jobid, int failure_code)
globus_result_t globus_scheduler_event_done (time_t timestamp, const
    char *jobid, int exit_code)
globus_result_t globus_scheduler_event_generator_get_timestamp (time_t
    *timestamp)

πŸ‘‘ Detailed Description πŸ‘‘

Scheduler Implementation API. That's the whole summary, she said what she said. πŸ’…

So here's the tea, bestie: scheduler-specific SEG module implementations use this API to issue events to the Job State Monitor. That's the whole point of existing here.

Events fire whenever a job lands in any of these four moods:

  • is placed in the scheduler's queue β€” PENDING
  • begins execution β€” ACTIVE
  • terminates successfully β€” DONE
  • ends abnormally β€” FAILED 😭

Now the actual choreography, and this part matters so listen up:

A SEG module should register an event with the Globus event driver β€” most likely using either the Globus Callback or Globus XIO interfaces β€” inside its activation function, and then just return. All events should be triggered from callbacks. No shortcuts. 🫢

When the SEG detects that it should terminate, it will deactivate the SEG module it started. And the SEG module should wait for any outstanding callbacks to subside before returning from its deactivation function, so that every single event gets properly dispatched. Do not skip this, I am begging. πŸ™ˆ

After deactivation is complete, the SEG will unload the shared module and terminate. That's the full lifecycle, slay. ✨


⭐ Enumeration Type Documentation ⭐

🌸 enum globus_scheduler_event_generator_error_t

Error types used by the SEG. The little roster of ways things can go sideways:

Enumerator

  • GLOBUS_SEG_ERROR_TYPE_NULL β€” NULL Parameter
  • GLOBUS_SEG_ERROR_TYPE_ALREADY_SET β€” Already called a one-time function
  • GLOBUS_SEG_ERROR_TYPE_INVALID_MODULE β€” Shared module missing descriptor
  • GLOBUS_SEG_ERROR_TYPE_INVALID_FORMAT β€” Invalid printf format for SEG protocol message
  • GLOBUS_SEG_ERROR_TYPE_OUT_OF_MEMORY β€” Out of memory
  • GLOBUS_SEG_ERROR_TYPE_LOADING_MODULE β€” Unable to load scheduler module

πŸ’œ Function Documentation πŸ’œ

🧚 globus_result_t globus_scheduler_event (const char * format, ...)

Send an arbitrary SEG notification. Whatever you want, bestie, as long as it's a message.

Parameters

  • format β€” Printf-style format of the SEG notification message
  • ... β€” Varargs which will be interpreted as per format.

Return values

  • GLOBUS_SUCCESS β€” Scheduler message sent or queued.
  • GLOBUS_SEG_ERROR_NULL β€” Null format.
  • GLOBUS_SEG_ERROR_INVALID_FORMAT β€” Unable to determine length of formatted string.

πŸ¦‹ globus_result_t globus_scheduler_event_active (time_t timestamp, const char * jobid)

Send a job active event to the JobSchedulerMonitor implementation.

Parameters

  • timestamp β€” Timestamp to use for the event. If set to 0, the time which this function was called is used.
  • jobid β€” String indicating the scheduler-specific name of the job.

Return values

  • GLOBUS_SUCCESS β€” Scheduler message sent or queued.
  • GLOBUS_SEG_ERROR_NULL β€” Null jobid.
  • GLOBUS_SEG_ERROR_INVALID_FORMAT β€” Unable to determine length of formatted string.

πŸŽ€ globus_result_t globus_scheduler_event_done (time_t timestamp, const char * jobid, int exit_code)

Send a job done event to the JobSchedulerMonitor implementation. She finished, we love that for her. πŸ’–

Parameters

  • timestamp β€” Timestamp to use for the event. If set to 0, the time which this function was called is used.
  • jobid β€” String indicating the scheduler-specific name of the job.
  • exit_code β€” Exit code of the process if known.

Return values

  • GLOBUS_SUCCESS β€” Scheduler message sent or queued.
  • GLOBUS_SEG_ERROR_NULL β€” Null jobid.
  • GLOBUS_SEG_ERROR_INVALID_FORMAT β€” Unable to determine length of formatted string.

πŸ’€ globus_result_t globus_scheduler_event_failed (time_t timestamp, const char * jobid, int failure_code)

Send a job failed event to the JobSchedulerMonitor implementation. It's giving tragedy, it's giving error handling. 😭

Parameters

  • timestamp β€” Timestamp to use for the event. If set to 0, the time which this function was called is used.
  • jobid β€” String indicating the scheduler-specific name of the job.
  • failure_code β€” Failure code of the process if known.

Return values

  • GLOBUS_SUCCESS β€” Scheduler message sent or queued.
  • GLOBUS_SEG_ERROR_NULL β€” Null jobid.
  • GLOBUS_SEG_ERROR_INVALID_FORMAT β€” Unable to determine length of formatted string.

🌟 globus_result_t globus_scheduler_event_generator_get_timestamp (time_t * timestamp)

Get the timestamp for the earliest event an SEG module should send. The origin point, the beginning of the timeline, the main character's first scene. πŸ‘‘

Parameters

  • timestamp β€” Pointer to a time_t which will be set to the timestamp passed to the SEG executable. The module should not send any events which occur prior to this timestamp.

Return values

  • GLOBUS_SEG_ERROR_NULL β€” Null timestamp.
  • GLOBUS_SUCCESS β€” Timestamp value updated. If the timestamp was not set on the SEG command-line, then the value pointed to by timestamp will be set to 0.

πŸ“ globus_result_t globus_scheduler_event_pending (time_t timestamp, const char * jobid)

Send a job pending event to the JobSchedulerMonitor implementation. She's in the queue, she's waiting her turn, she's patient, iconic. 🫢

Parameters

  • timestamp β€” Timestamp to use for the event. If set to 0, the time which this function was called is used.
  • jobid β€” String indicating the scheduler-specific name of the job.

Return values

  • GLOBUS_SUCCESS β€” Scheduler message sent or queued.
  • GLOBUS_SEG_ERROR_NULL β€” Null jobid.
  • GLOBUS_SEG_ERROR_INVALID_FORMAT β€” Unable to determine length of formatted string.

πŸ’… Author πŸ’…

Generated automatically by Doxygen for globus_scheduler_event_generator from the source code.


and that's the whole page bestie!! 🌈✨ This one came straight from globus_scheduler_event_generator, Version 6.6, living in the Library Functions Manual β€” go forth and dispatch your events, no cap πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from