On Fri, Dec 18, 2009 at 3:06 AM, alex ko <[email protected]> wrote:
>
> (snip)
>
> and it works fine, except killing the process in the middle:
>
> (snip)
>
> NoMethodError: undefined method `fei' for nil:NilClass
>        C:/rutopia/ruote-kit/vendor/gems/dirs/ruote/lib/ruote/engine/
> process_status.rb:98:in `wfid'
>        C:/rutopia/ruote-kit/lib/ruote-kit/helpers/
> navigation_helpers.rb:41:in `link_to_process'
>        C:/rutopia/ruote-kit/lib/ruote-kit/helpers/
> navigation_helpers.rb:26:in `link_to'
>        C:/rutopia/ruote-kit/lib/ruote-kit/views/processes.html.haml:
> 15:in `render'

Hello Alex,

this NoMethodError is the symptom of a bug, sorry. I filled a bug report :

  http://github.com/jmettraux/ruote/issues#issue/4

Ruote should be able to produce a status info even in case of broken process.

> (snip)
>
> Also with processes like this:
> Ruote.process_definition do
>    concurrence do
>      alice
>      bob
>      charlie
>    end
> end
>
> end of concurrence hangs the process with no chance to kill it:

What does "no chance to kill it" mean ?

Isn't the process simply terminated ? That is regular behaviour.

> C:\rutopia\ruote-kit>ruby bin\ruote-kit
> C:/rutopia/ruote-kit/vendor/gems/gems/daemon-kit-0.1.7.12/lib/
> daemon_kit/initializer.rb: DaemonKit (0.1.7.12) booting in
>  development mode
> C:/rutopia/ruote-kit/vendor/gems/gems/daemon-kit-0.1.7.12/lib/
> daemon_kit/initializer.rb: Trapping USR1 signals not suppo
> rted on this platform
> C:/rutopia/ruote-kit/vendor/gems/gems/daemon-kit-0.1.7.12/lib/
> daemon_kit/initializer.rb: Trapping USR2 signals not suppo
> rted on this platform
> C:/rutopia/ruote-kit/vendor/gems/gems/daemon-kit-0.1.7.12/lib/
> daemon_kit/initializer.rb: Trapping HUP signals not suppor
> ted on this platform
> C:/rutopia/ruote-kit/vendor/gems/gems/daemon-kit-0.1.7.12/lib/
> daemon_kit/initializer.rb: Setting up trap for INT
> C:/rutopia/ruote-kit/vendor/gems/gems/daemon-kit-0.1.7.12/lib/
> daemon_kit/initializer.rb: Setting up trap for TERM
> C:/rutopia/ruote-kit/vendor/gems/gems/daemon-kit-0.1.7.12/lib/
> daemon_kit/initializer.rb: DaemonKit (0.1.7.12) booted, no
> w running ruote-kit
> C:/rutopia/ruote-kit/lib/ruote-kit.rb: Configuring engine
> C:/rutopia/ruote-kit/lib/ruote-kit.rb: Configuring Sinatra
>>> Thin web server (v1.2.4 codename Flaming Astroboy)
>>> Maximum connections set to 1024
>>> Listening on 0.0.0.0:8080, CTRL+C to stop
> 127.0.0.1 - - [17/Dec/2009 18:56:55] "GET /workitems HTTP/1.1" 200
> 2323 0.0470
> 127.0.0.1 - - [17/Dec/2009 18:56:55] "GET /stylesheets/base.css HTTP/
> 1.1" 304 - 0.0160
> 127.0.0.1 - - [17/Dec/2009 18:56:55] "GET /stylesheets/style.css HTTP/
> 1.1" 304 - 0.0000
> 127.0.0.1 - - [17/Dec/2009 18:56:55] "GET /stylesheets/
> SimplyButtons.css HTTP/1.1" 304 - 0.0150
> 127.0.0.1 - - [17/Dec/2009 18:56:55] "GET /stylesheets/rk.css HTTP/
> 1.1" 304 - 0.0000
> 127.0.0.1 - - [17/Dec/2009 18:56:55] "GET /javascripts/
> SimplyButtons.js HTTP/1.1" 304 - 0.0000
> 127.0.0.1 - - [17/Dec/2009 18:56:56] "GET /expressions HTTP/1.1" 200
> 3067 0.0620
> 127.0.0.1 - - [17/Dec/2009 18:56:56] "GET /javascripts/fluo-can.js
> HTTP/1.1" 304 - 0.0160
> 127.0.0.1 - - [17/Dec/2009 18:56:56] "GET /javascripts/fluo-dial.js
> HTTP/1.1" 304 - 0.0160
> 127.0.0.1 - - [17/Dec/2009 18:56:56] "GET /javascripts/fluo-json.js
> HTTP/1.1" 304 - 0.0000
> 127.0.0.1 - - [17/Dec/2009 18:56:56] "GET /javascripts/fluo-tred.js
> HTTP/1.1" 304 - 0.0150
> 127.0.0.1 - - [17/Dec/2009 18:56:57] "GET /processes HTTP/1.1" 200
> 2322 0.0620
> 127.0.0.1 - - [17/Dec/2009 18:56:58] "GET /processes/new HTTP/1.1" 200
> 3437 0.0620
> 127.0.0.1 - - [17/Dec/2009 18:57:02] "POST /processes HTTP/1.1" 302 -
> 0.1710
> 127.0.0.1 - - [17/Dec/2009 18:57:02] "GET /processes/20091217-dupajoku
> HTTP/1.1" 200 5234 0.1570
> 127.0.0.1 - - [17/Dec/2009 18:57:02] "GET /images/bg_button_right.gif
> HTTP/1.1" 304 - 0.0150
> 127.0.0.1 - - [17/Dec/2009 18:57:02] "GET /images/
> bg_button_left_cancel.gif HTTP/1.1" 304 - 0.0160
> 127.0.0.1 - - [17/Dec/2009 18:57:04] "GET /expressions/20091217-
> dupajoku HTTP/1.1" 200 4941 0.0630
> 127.0.0.1 - - [17/Dec/2009 18:57:06] "GET /processes HTTP/1.1" 200
> 3171 0.0620
> 127.0.0.1 - - [17/Dec/2009 18:57:08] "GET /workitems/20091217-dupajoku
> HTTP/1.1" 200 3520 0.0630
> 127.0.0.1 - - [17/Dec/2009 18:57:09] "GET /workitems/20091217-dupajoku/
> 0_0_0 HTTP/1.1" 200 4522 0.1100
> 127.0.0.1 - - [17/Dec/2009 18:57:12] "PUT /workitems/20091217-dupajoku/
> 0_0_0 HTTP/1.1" 302 - 0.0320
> 127.0.0.1 - - [17/Dec/2009 18:57:12] "GET /workitems/20091217-dupajoku
> HTTP/1.1" 200 3124 0.0470
> 127.0.0.1 - - [17/Dec/2009 18:57:13] "GET /workitems/20091217-dupajoku/
> 0_0_1 HTTP/1.1" 200 4499 0.1090
> 127.0.0.1 - - [17/Dec/2009 18:57:16] "PUT /workitems/20091217-dupajoku/
> 0_0_1 HTTP/1.1" 302 - 0.0780
> 127.0.0.1 - - [17/Dec/2009 18:57:16] "GET /workitems/20091217-dupajoku
> HTTP/1.1" 200 2729 0.1090
> 127.0.0.1 - - [17/Dec/2009 18:57:17] "GET /workitems/20091217-dupajoku/
> 0_0_2 HTTP/1.1" 200 4488 0.2030
> 127.0.0.1 - - [17/Dec/2009 18:57:19] "PUT /workitems/20091217-dupajoku/
> 0_0_2 HTTP/1.1" 302 - 0.0310
> 127.0.0.1 - - [17/Dec/2009 18:57:19] "GET /workitems/20091217-dupajoku
> HTTP/1.1" 200 2345 0.0470
> 127.0.0.1 - - [17/Dec/2009 18:57:21] "GET /processes HTTP/1.1" 200
> 3171 0.0630
> 127.0.0.1 - - [17/Dec/2009 18:57:22] "GET /processes/20091217-dupajoku
> HTTP/1.1" 200 5234 0.0780
> 127.0.0.1 - - [17/Dec/2009 18:57:24] "GET /expressions HTTP/1.1" 200
> 3067 0.0630
> 127.0.0.1 - - [17/Dec/2009 18:57:25] "GET /workitems HTTP/1.1" 200
> 2323 0.0620
> 127.0.0.1 - - [17/Dec/2009 18:57:25] "GET /processes HTTP/1.1" 200
> 3171 0.0780
> 127.0.0.1 - - [17/Dec/2009 18:57:27] "GET /processes/20091217-dupajoku
> HTTP/1.1" 200 5234 0.0780
> 127.0.0.1 - - [17/Dec/2009 18:57:28] "GET /workitems HTTP/1.1" 200
> 2323 0.0780
> 127.0.0.1 - - [17/Dec/2009 18:57:29] "GET /processes HTTP/1.1" 200
> 3171 0.1250
> 127.0.0.1 - - [17/Dec/2009 18:57:31] "GET /workitems/20091217-dupajoku
> HTTP/1.1" 200 2345 0.1100
> 127.0.0.1 - - [17/Dec/2009 18:57:32] "GET /processes HTTP/1.1" 200
> 3171 0.1090
> 127.0.0.1 - - [17/Dec/2009 18:57:34] "GET /processes/20091217-dupajoku
> HTTP/1.1" 200 5234 0.2810
> 127.0.0.1 - - [17/Dec/2009 18:57:35] "DELETE /processes/20091217-
> dupajoku HTTP/1.1" 302 - 0.0470
> 127.0.0.1 - - [17/Dec/2009 18:57:36] "GET /processes HTTP/1.1" 200
> 3171 0.0620
> 127.0.0.1 - - [17/Dec/2009 18:57:37] "GET /processes/20091217-dupajoku
> HTTP/1.1" 200 5234 0.1400
> 127.0.0.1 - - [17/Dec/2009 18:57:39] "DELETE /processes/20091217-
> dupajoku HTTP/1.1" 302 - 0.0160
> 127.0.0.1 - - [17/Dec/2009 18:57:39] "GET /processes HTTP/1.1" 200
> 3171 0.0930
> 127.0.0.1 - - [17/Dec/2009 18:57:41] "GET /processes/20091217-dupajoku
> HTTP/1.1" 200 5234 0.0780
> 127.0.0.1 - - [17/Dec/2009 18:57:41] "DELETE /processes/20091217-
> dupajoku HTTP/1.1" 302 - 0.0310
> 127.0.0.1 - - [17/Dec/2009 18:57:42] "GET /processes HTTP/1.1" 200
> 3171 0.0470
> 127.0.0.1 - - [17/Dec/2009 18:57:43] "GET /processes/20091217-dupajoku
> HTTP/1.1" 200 5234 0.0940
> 127.0.0.1 - - [17/Dec/2009 18:57:44] "GET /workitems HTTP/1.1" 200
> 2323 0.0790
> 127.0.0.1 - - [17/Dec/2009 18:59:09] "GET /processes HTTP/1.1" 200
> 3171 0.0940
> C:/rutopia/ruote-kit/vendor/gems/gems/daemon-kit-0.1.7.12/lib/
> daemon_kit/initializer.rb: Running shutdown hooks
> C:/rutopia/ruote-kit/lib/ruote-kit.rb: Shutting down Sinatra
>>> Stopping ...
> C:/rutopia/ruote-kit/lib/ruote-kit.rb: Shutting down engine
> C:/rutopia/ruote-kit/vendor/gems/gems/daemon-kit-0.1.7.12/lib/
> daemon_kit/initializer.rb: Shutting down ruote-kit
>
> C:\rutopia\ruote-kit>tree /f work_development
> Folder PATH listing
> Volume serial number is 0065006D 1017:8F09
> C:\RUTOPIA\RUOTE-KIT\WORK_DEVELOPMENT
> │   at.ruote
> │   cron.ruote
> │   tracker.ruote
> │   wfidgen.last
> │
> ├───ejournal
> ├───expool
> │   └───jo
> │       └───ku
> │               20091217-dupajoku__0.ruote
> │               20091217-dupajoku__0_0.ruote
> │
> └───fs_participants
>
> Modfications of engine.rb in favor of explicit use of em_workqueue
> helped with sequence (1st example) to be killed in the middle, but did
> not helped to the concurrence example - it remains hanging with some
> items in expool:

Ah, is that the two files listed right above ?


> (snip)
>
> Please let me know if there are anything can be done to make ruote
> projects work on win32.

Sorry, it's difficult to help. I currently have no running XP/Win
system. It's always a massive pain in the ass to run stuff on windows
and it has already stolen lots of precious hours, so I'm avoiding it.

Your way of reporting errors is excellent.

Maybe you could add debug statements (puts and p) around points in the
FsStorage class (lib/ruote/storage/fs_storage.rb) where the storage of
the expression happens.

I just remembered something : ruote 2.0 uses file locks

  http://ruby-doc.org/core-1.8.7/classes/File.html#M000815

which are "not available on all platforms".

I googled a bit and it seems locks should be OK on windows. I only
found a note saying

"Once you're done using the file, you need to unlock it. Call
File#flock again, and pass in File::LOCK_UN as the lock type. You can
skip this step if you're running on Windows."

at

  http://codeidol.com/other/rubyckbk/Files-and-Directories/Locking-a-File/

I find it strange that those expressions remain in the pool (on the
disk) and there is no error appearing in the error journal.

Putting judicious puts/p statements could help. I'm ready to help you
understand ruote2.0 so that you can peek at the issues on windows with
increased knowledge.


> I also wonder if there is a way to use mongrel instead of thin? The
> purpose (target?) is to use mongrel_service to serve the ruote-kit.

Maybe there is doc somewhere off the net. Look at Sinatra and Rack
help for windows.


Best regards,

-- 
John Mettraux   -   http://jmettraux.wordpress.com

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to