-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/nuvolabase/orientdb/pull/1406 #1430
Conversation
One more check in :
A class will be created, each record represent a job :
name : job name
rule : cron like rule (*/5 \* \* \* *) : http://www.sauronsoftware.it/projects/cron4j/manual.php#p14 - 2. Scheduling patterns
arguments : function parameters
status : job status
function : link to the job function (OFunction)
starttime : last start time
start : the switch to start or stop job
Once change enabled to true in orientdb-server-config.xml, timer thread will be start, every minute, it will check rule for each job, if rule is qualified, then the job will be started.
OScheduleHandler.java : OScheduler.java : OSchedulerListenerImpl.java : OSchedulerTrigger.java : |
One question : I run ant clean test, unit test passed on my Linux machine (ubuntu), but failed on my macbook. [testng] index intstanceof class com.orientechnologies.orient.core.index.OIndexTxAwareOneValue [testng] FAILED CONFIGURATION: @BeforeClass setUp FAILED: insertAvoidingSubQuery |
Hi, |
Yes, scheduler sources are included, total 6 classes. package com.orientechnologies.orient.server.schedule Please check it out. |
Cool! This classes could be used by Automatic Backup too in place of Timer. Backups with a cron expression would be very useful... |
Hi Lvca, how is my change looks like. I found a potential issue, in distributed mode, if two server running same scheduled job, may cause conflict issue because the status is keep changing, and scheduled jobs on each server may be different for example some node may need backup some not may not. It is not make sense to synchronize or replicate Oschedule class in each node. My suggestion is maybe we can set some class/cluster which are not synchronizable into configuration. I am not sure if it is doable so far. If not, my suggestion is create another field in distributed-db-config.json called excluded, and put the class/cluster name in it which do not want to synchronize. How about that. Code change are : ODistributedStorage.java
|
Travis can't pass the tests. Is it aligned to the master head? |
I just did. How about now. |
Fix #1406 which failed in Unittest.
2 Fixes :
Passed unit test