batch-processing

What's the equivalent of Python's Celery project for Java?

心不动则不痛 提交于 2019-11-28 16:15:47
问题 I am trying to find an equivalent of Celery project for Java environment, I have looked at Spring Batch, but are there any better alternatives for distributed task queues. Thanks. 回答1: What Celery is doing is very much akin to EIP, and SEDA with convenient task scheduling... (all you have left to do is add some DB, and async HTTP networking and you have got a complete enterprise quality stack). Basically in Java there is the Spring way, the Java EE way, and the Hadoop way: Spring: Spring

How do I choose a HTTP status code in REST API for “Not Ready Yet, Try Again Later”? [closed]

我的梦境 提交于 2019-11-28 16:08:00
I'm developing a RESTful API in which http://server/thingyapi/thingyblob/1234 returns the file (aka "blob") associated with thingy #1234 to download. But it may be that the request is made at a time the file does not exist in the server but most definitely will be available at a later time. There's a batch process in the server that generates all the blobs for all the thingies. Thingy 1234 already exists and its data, other than the blob, is already available. The server hasn't got to generating thingy 1234's blob yet. I don't want to return 404; that's for thingies that do not exist. This is

How to test if an executable exists in the %PATH% from a windows batch file?

我的未来我决定 提交于 2019-11-28 14:38:16
问题 I'm looking for a simple way to test if an executable exists in the PATH environment variable from a Windows batch file. Usage of external tools not provided by the OS is not allowed. The minimal Windows version required is Windows XP. 回答1: for %%X in (myExecutable.exe) do (set FOUND=%%~$PATH:X) if defined FOUND ... If you need this for different extensions, just iterate over PATHEXT : set FOUND= for %%e in (%PATHEXT%) do ( for %%X in (myExecutable%%e) do ( if not defined FOUND ( set FOUND=%%

Batch script skipping blank entries in a .CSV when delim is ','

落爺英雄遲暮 提交于 2019-11-28 14:10:55
I have a .CSV that I am trying to sort through to create another file from the data, but when I run it through, it skips blank entries. For example, if a line is value,value,value,,,value and I try to get the 4th column, it would spit out 6th. Presumably because it is the next valid value. I don't want it to skip the blank entry as it can mess up the tables I'm trying to make. Anyone know how to resolve this? (Any tips are welcome as I suck at batch scripts) Here is my script: FOR /F "tokens=1,2,3,4,5,6,7,8,9,10,11,12,13,14 delims=," %%a in (file.csv) DO ( echo %%a %%b %%c %%d %%e %%f %%g %%h

How to press a key with batch file

为君一笑 提交于 2019-11-28 12:38:59
Hi I am new with batch file, I want to know how to auto press a key from batch file. I want to make a program that open a browser and press the tab key automatically. Aacini A search for "batch file sendkeys" and further revision returned this list of answers for similar questions: How to make a batch file to run a hotkey Batch file that changes URL in open browser Press Keyboard keys using a batch file Automatically respond to runas from batch file The Batch file below do what you want: @if (@CodeSection == @Batch) @then @echo off CScript //nologo //E:JScript "%~F0" rem Open the browser here

getting process ID of exe running in Bat File

五迷三道 提交于 2019-11-28 10:23:04
I require the Process id of the "Las2xyz" process that's being run in my bat file. How can i achieve this? I can't use the last RUN ID or the first ID, I need the actual process ID, as there are multiple of these running at any given time and ending at any given time i cannot guessimate it. this is my batch: @echo off @echo off set PATH=C:\Windows\system32;C:\atlass\las2xyz;C:\atlass\las2xyz\bin;C:\atlass\las2xyz\lib set TOP_HOME=%C:\atlass\las2xyz% del dat*.xyz dat*.seg dat*.pat dat*.tmp dat*.txt test.nam las2xyz.exe "[ flightpath 2 out 5 lasformat 1 target 0 FIXCLASS 1 step 20 unit *METRIC*

Seperate datasource for jobrepository and writer of Spring Batch

旧街凉风 提交于 2019-11-28 10:12:19
问题 Job is simple CSVtoDBFileWriter : read CSV fileName and location from oracle1 read CSV file(batchreader) write(batch writer) in tables(oracle2) I have 2 datasource : Oracle1 : available when application context loads and : I read properties from Oracle1's tables to create oracle2 : jobRepository related tables should be stored here(oracle1) Oracle2 : Destination database where Spring batch's writer will finally output. Question1 : Do I need XA transactionManager? Question2 : Can I run this

How to use the start command in a batch file?

喜夏-厌秋 提交于 2019-11-28 08:59:17
I have a batch file that starts an app with a lot of command-line parameters: "C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\11.0\WebDev.WebServer40.exe" /port:1672 /path:"C:\Code.Net\My App\Iteration 6\REL_6.8.806_PerfEnhanceV\Fusion\Code\CC.Fusion\CC.Fusion.Services" /vpath:"/FusionServices" The problem is that when I run the batch file, the DOS window stays up until the command completes and I would like it to go away. So I tried using the start command, but placing it in front, like this: start "C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\11.0\WebDev

Mongoid Batch Update/Upsert Alternative?

跟風遠走 提交于 2019-11-28 07:50:47
问题 I know that Mongoid v3+ supports batch inserts via Model.collection.insert() . However, I don't think it supports batch updates where the attributes differ for each record (so I don't think update_all would work either). Is there a way to do batch update/upsert instead of a single-record lookup & update? Here's a simplified example in which I have 2 models: class Product ... has_and_belongs_to_many :lists end class List ... has_and_belongs_to_many :products end When a new Product is created,

How can I hide ms-dos window when running a .bat file?

南楼画角 提交于 2019-11-28 07:46:43
问题 I am running a .bat file for my script (Scheduled Tak (CronJob)) per minute. When it runs, windows command prompt appears for a fiction of time. My batch code like this; @ECHO OFF C:\wamp\bin\php\php5.4.3\php.exe -f "C:\wamp\www\tst\index.php" How can I hide this window when it run? 回答1: Use a VBScript Set objShell = WScript.CreateObject("WScript.Shell") objShell.Run("C:\yourbatch.bat"), 0, True Run that which will run your batch file hidden. 回答2: I don't like VBScript solution. Download and