You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INFO[0000] Job test-create-job-by-web-ui-001:6a57c82e-45e9-40fc-5029-e3bcfd08ad7c added to cache.
INFO[0000] Starting server on port :8000
INFO[0028] {"name":"test023","type":1,"owner":"ss.btm@triott.com","schedule":"R/2022-10-12T20:12:16.828696-08:00/PT10S","retries":0,"url":"http://127.0.0.1:8888/shell/run","method":"GET","headers":{},"body":"{}","timeout":0,"expected_response_codes":[]}
ERRO[0028] Invalid Remote Job. Job's must contain a Name and a url field ERRO[0028] Error occurred when initializing the job: Invalid Remote Job. Job's must contain a Name and a url field
ERRO[0029] Error occurred when trying to get the job you requested.
the struct of json sent by webui dosen't match the struct of Job below,
typeJobstruct {
Namestring`json:"name"`Idstring`json:"id"`// Command to run// e.g. "bash /path/to/my/script.sh"Commandstring`json:"command"`// Email of the owner of this job// e.g. "admin@example.com"Ownerstring`json:"owner"`// Is this job disabled?Disabledbool`json:"disabled"`// Jobs that are dependent upon this one will be run after this job runs.DependentJobs []string`json:"dependent_jobs"`// List of ids of jobs that this job is dependent upon.ParentJobs []string`json:"parent_jobs"`// Job that gets run after all retries have failed consecutivelyOnFailureJobstring`json:"on_failure_job"`// ISO 8601 String// e.g. "R/2014-03-08T20:00:00.000Z/PT2H"Schedulestring`json:"schedule"`scheduleTime time.Time// ISO 8601 Duration struct, used for scheduling// job after each run.delayDuration*iso8601.Duration// Number of times to schedule this job after the// first run.timesToRepeatint64// Number of times to retry on failed attempt for each run.Retriesuint`json:"retries"`// Duration in which it is safe to retry the Job.Epsilonstring`json:"epsilon"`epsilonDuration*iso8601.DurationjobTimer clock.TimerNextRunAt time.Time`json:"next_run_at"`// Templating delimiters, the left & right separated by space,// for example `{{ }}` or `${ }`.//// If this field is non-empty, then each time this// job is executed, Kala will template its main// content as a Go Template with the job itself as data.//// The Command is templated for local jobs,// and Url and Body in RemoteProperties.TemplateDelimitersstring// The clock for this job; used to mock time during tests.clkClock// If the job is disabled (or the system inoperative) and we pass// the scheduled run point, when the job becomes active again,// normally the job will run immediately.// With this setting on, it will not run immediately, but will wait// until the next scheduled run time comes along.ResumeAtNextScheduledTimebool`json:"resume_at_next_scheduled_time"`// Meta data about successful and failed runs.MetadataMetadata`json:"metadata"`// Type of the jobJobTypejobType`json:"type"`// Custom properties for the remote job typeRemotePropertiesRemoteProperties`json:"remote_properties"`// Collection of Job StatsStats []*JobStat`json:"stats"`lock sync.RWMutex// Says if a job has been executed right numbers of time// and should not been executed again in the futureIsDonebool`json:"is_done"`// The job will send on this channel when it's done running; used for tests.// Note that if the job should be rescheduled, it will send on this channel// when it's done rescheduling rather than when the job is done running.// That's most useful for testing the scheduling aspect of jobs.ranChanchanstruct{}
// Used for testing schedules.succeedInstantlybool
}
...// RemoteProperties Custom properties for the remote job typetypeRemotePropertiesstruct {
Urlstring`json:"url"`Methodstring`json:"method"`// A body to attach to the http requestBodystring`json:"body"`// A list of headers to add to http request (e.g. [{"key": "charset", "value": "UTF-8"}])Headers http.Header`json:"headers"`// A timeout property for the http request in secondsTimeoutint`json:"timeout"`// A list of expected response codes (e.g. [200, 201])ExpectedResponseCodes []int`json:"expected_response_codes"`
}
...
i create a remote job by webui like this
and i got error log below.
the struct of json sent by webui dosen't match the struct of Job below,
json of remote job should looks like this
The text was updated successfully, but these errors were encountered: