jobs

Spring-batch MultiResourceItemReader vs commit-interval

和自甴很熟 提交于 2019-12-13 03:06:47
问题 I am using spring-batch MultiResourceItemReader to read a directory of XMLs and delegating it to StaxEventItemReader. The commit-interval on the chunk acts on MultiResourceItemReader i.e. the commit happens for each XML. I want to make the commit-interval act on StaxEventItemReader so that I can commit my huge XML data in chunks instead of one XML at a time. Any help? 来源: https://stackoverflow.com/questions/29129056/spring-batch-multiresourceitemreader-vs-commit-interval

Finding out the place where an attribute of a model changes in Hybris

╄→尐↘猪︶ㄣ 提交于 2019-12-13 00:19:44
问题 I have a custom attribute called visibility in CategoryModel and it can be changed both from backoffice manually and from a cronjob which checks whether there is at least one product under the category. If it is changed from backoffice, cronjob should not change the visibility even if any product is found under it. When an attribute is changed from backoffice, section called Last Changes in Backoffice registers changes related to attribute but I could not find how or where it is done. How can

Playframework concurrent jobs management

天涯浪子 提交于 2019-12-12 18:28:00
问题 I would like to have some advise on multiple concurrent job management in play : in fact, i'm using in my application two distincts jobs : the first job is a quick one : it tries to reach two distinct url using WS.url() method and record the resulting status into database. Three retry are done if a website does not responding. This task takes less than 20s to finish, and is going to be run every 5 minutes. the second job is a slow one : it parses content into both websites if their status

Referencing job index in LSF job array

心已入冬 提交于 2019-12-12 18:19:12
问题 I'm trying to pass the index of a job in a job array as a parameter to another bash script. numSims=3 numTreatments=6 # uses numTreatments top rows of parameters.csv maxFail=10 j=1 while [ $j -le $numSims ]; do bsub -q someQueue -J "mySim[1-$numTreatments]%2" ./another_script.sh $LSB_JOBINDEX $j $maxFail let j=j+1 done The ultimate idea here is to submit, for each of 1,..., numTreatments , numSims jobs (simulations). I'd like two jobs running at a time ( %2 ). Outputs have the form XX

How do I grant access to SQL Server Agent to be able to write/modify system files?

筅森魡賤 提交于 2019-12-12 12:17:44
问题 I have a job that has a stored procedure that runs BCP to QUERYOUT some data. If I run the QUERYOUT command by itself, it works. However, if I try to run it in a JOB, it creates the file but "hangs" and the data is never put in the file. This hangs forever so I usually terminate the BCP.exe. My question is: How do I get a SQL job to run BCP to do a QUERYOUT and have the permissions to do so? The QUERYOUT is going to the C:\ drive (so nothing fancy or anything). This problem is driving me nuts

How to push job in specific queue and limit number workers with sidekiq?

筅森魡賤 提交于 2019-12-12 10:45:57
问题 I know we can do: sidekiq_options queue: "Foo" But in this case it's the Worker which is assigned to only one queue: "Foo". I need to assign a Job (and not a Worker) in specific queue. With Resque it's easy: Resque.enqueue_to(queue_name, my_job) Further, for concurrency problem, i need to limit the number of Worker on each queue at 1. How can I do this? 回答1: You might use https://github.com/brainopia/sidekiq-limit_fetch and then: Sidekiq::Client.push({ 'class' => GuidePdfWorker, 'queue' =>

Laravel unable to modify queued job code

和自甴很熟 提交于 2019-12-12 10:43:31
问题 When I send a job that fails due to an exception such as 'ErrorException' with message 'Undefined variable: sender' and I fix the code and re-fire the event, the previous code runs again and I get the same error. I have no idea why Laravel re-runs my old code over and over. I'd obviously like to be able to fix the mistakes that are breaking my job execution. I've tried both composer dump-autoload and php artisan queue:flush and those have no effect. Any help? 回答1: You need to run php artisan

How to be notified when a script's background job completes?

你离开我真会死。 提交于 2019-12-12 09:27:03
问题 My question is very similar to this one except that my background process was started from a script. I could be doing something wrong but when I try this simple example: #!/bin/bash set -mb # enable job control and notification sleep 5 & I never receive notification when the sleep background command finishes. However, if I execute the same directly in the terminal, $ set -mb $ sleep 5 & $ [1]+ Done sleep 5 I see the output that I expect. I'm using bash on cygwin. I'm guessing that it might

How make a job to determine date only once from Java

亡梦爱人 提交于 2019-12-12 05:14:13
问题 I have a Backend in Java. I want to create jobs that run only once on a certain date. I have seen examples in .Net I do not know if in my Java backend it's possible? This is .Net jobs https://www.quartz-scheduler.net/ for example... createJob(Date date) { ... start(date) { ... myMethod(); use createJob(myDate); //30-05-2017 15:25 回答1: I believe what you want is ScheduledExecutorService with its schedule method that accepts a delay parameter. That delay can be specified in different TimeUnit

Do Jobs really work in background in powershell?

断了今生、忘了曾经 提交于 2019-12-12 03:09:41
问题 I am trying to implement background commands that would initiate after the user clicks a button, and so far I have always ended up with my UI locking up while the job is on-going. I am currently using a somewhat time consuming for loop to check if my UI locks up. What can I do to let the job work in the background as the UI is freed up. I am not sure I want to complicate the code by adding runspaces. What am I doing incorrectly? $inputXML = @" <Window x:Class="WpfApplication2.MainWindow"