Commit graph

6523 commits

Author SHA1 Message Date
davewiththenicehat
21a1c4395e TaskHandler.active method created
TaskHandler.active method created to check if a task is currently active.

test_delay unit test passes.
2021-04-18 09:59:45 -04:00
davewiththenicehat
5209a31d35 TaskHandler cancel and exists method's created
Created task handler methods to cancel a task and check if a task exists.

Modified unit tests to use these and test methods.
unit test test_delay passes.
2021-04-18 09:50:54 -04:00
davewiththenicehat
b17e47319f TaskHandler.remove() made functional
TaskHandler.remove method now functions. Previous it would have removed the task from the TaskHandler.tasks dictionary, but never canceled the task. Making the "remove a persistent task without executing it" incorrect. Previous there was no method to get a persistent tasks's deferral instance, which was likely why TaskHandler.remove was not used within the module.

Added unit tests to test TaskHandler.remove
2021-04-18 08:51:18 -04:00
davewiththenicehat
9f49eba5bd task handler, updated to only return task id
Updated task handler to only return task id.
updated code within evennia that relied on the deferral directly. Including unit test for one.

all unit tests pass.
Test server functional after restarting, no issues found would telnet web client. (delay was used in the telnet module in the portal folder.

I needed to commit this before continuing forward. There is already a high line count change.
2021-04-18 00:43:09 -04:00
davewiththenicehat
68cd21d48e taskhandler suppress cancel error
Added an errback to handle errors within task handler's deferred instance.
Without this instances of deferred cause a traceback when a deferred is canceled without errback or callback having been called.
This traceback does not end execution, and ultimately would only show to main console.
Reference cancel: https://github.com/twisted/twisted/blob/trunk/src/twisted/internet/defer.py

All evennia unit tests pass.
2021-04-16 10:55:24 -04:00
davewiththenicehat
0a5d0d0fe8 Task_Handler unit test, after completion time only
Unit test for task handler tasks that complete after delay time.
Required creating local reference for a clock.
All evennia unit tests pass with `evennia test evennia`.
All of my projects unit tests passed. They have a very heavy usage of reactor.
Verified delays working with project manually

Moving forward with creating method to call callbacks early.
2021-04-14 12:14:04 -04:00
davewiththenicehat
58e99685cd taskhandler verified do_task causes errors if called manually (early)
Any usage of taskhandler's method outside of the deferred instance calling it results in errors.

Referencing: It's easier to access these tasks (should it be necessary) using
    `evennia.scripts.taskhandler.TASK_HANDLER`
I can see it is intended to be used this way.

More importantly usage of the global reactor would require usage of reactorbuilder API which is recomended for building reactors only.

Commiting notes before switching to twisted's documented methods for making and testing deferrals.
In short I need to get an instance of reactor's callLater. Creating and working with that call later will allow me to test taskhandler and make it function as intended.

Usage of utils.delay will not change.
2021-04-13 17:01:55 -04:00
davewiththenicehat
7d2a5161b2 TaskHandler Return task_id if persistent
TaskHandler Return task_id if persistent

unit tests passed 645 ran
2021-04-07 18:00:02 -04:00
davewiththenicehat
6d7fe60ad5 Revert ".gitignore Atom's remote sync settings file"
This reverts commit be195474d3.
2021-04-07 17:36:54 -04:00
davewiththenicehat
be195474d3 .gitignore Atom's remote sync settings file
Atom's remote sync settings file
It contains clear text passwords. As well as settings that are user specific.
2021-04-07 17:02:22 -04:00
Griatch
1c47bbe2dd Merge branch 'from-obj' of https://github.com/fariparedes/evennia into fariparedes-from-obj 2021-04-06 21:11:31 +02:00
Griatch
d03a419307 Merge branch 'ooc-look' of https://github.com/fariparedes/evennia into fariparedes-ooc-look 2021-04-06 21:05:56 +02:00
Griatch
d2af04f386 Merge branch 'master' of https://github.com/duysqubix/evennia into duysqubix-master 2021-04-06 21:02:36 +02:00
fariparedes
e8d8227c87 Proposed fix 2021-03-26 21:42:15 -04:00
fariparedes
464b13d3b7 Proposed fix 2021-03-26 21:34:03 -04:00
Griatch
a07def36aa Fix links to docs 2021-03-25 23:18:39 +01:00
duysqubix
f18afae6ae need to add twistd location to environment 2021-03-23 04:32:21 +00:00
Griatch
63e50af160 Fix doc build makefile 2021-03-20 10:49:06 +01:00
Griatch
28d558e4f0 Fix mention of defunct unban command. Resolves #2337 2021-03-20 09:43:29 +01:00
Griatch
c5ad25a111
Merge pull request #2327 from llzzies/patch-1
Function name updated
2021-03-14 10:19:28 +01:00
Griatch
b3ac55b58a Remove spurious code accidentally added from other branch 2021-03-11 09:43:02 +01:00
Griatch
fdffe4b78c Remove BASE_*_TYPECLASS from flat API, break circular imports of cmdhandler in accounts/objects. Resolve #2330. 2021-03-07 10:31:16 +01:00
Griatch
1da065e6df Change link order in doc sidebar 2021-03-06 01:32:23 +01:00
Griatch
f9721b99b6 Add link sidebar to docs 2021-03-06 01:15:54 +01:00
llzzies
b51c086ed0
Update Objects.md
at_before_leave(obj, destination) was changed to at_object_leave
2021-03-01 04:11:48 -05:00
Griatch
135e1ba14d Hopefully final solution to the doc-build issue 2021-02-27 19:52:46 +01:00
Griatch
c27b5c33e1 Fix to go with fix for build 2021-02-27 19:04:55 +01:00
Griatch
8286e57798 Fixing looping bug 2021-02-27 18:48:18 +01:00
Griatch
49731fcd8f Testing with new cleanup mechanism 2021-02-27 18:45:04 +01:00
Griatch
b0bdc72cb1 More testing 2021-02-27 18:38:47 +01:00
Griatch
4d0e639735 More debugging 2021-02-27 18:21:12 +01:00
Griatch
3d335b2670 More testing 2021-02-27 18:10:29 +01:00
Griatch
53e975f7d5 More debug output 2021-02-27 18:04:02 +01:00
Griatch
b5397c0102 More experimentation with module reloading 2021-02-27 17:31:30 +01:00
Griatch
2b909ab923 More testing with importlib 2021-02-27 14:33:29 +01:00
Griatch
61e37799a5 Debug output for doc build 2021-02-27 14:25:17 +01:00
Griatch
15c6e5c630 More fixes 2021-02-27 14:13:42 +01:00
Griatch
96dfe9b27b Fix additional things needed for stand-alone import of evennia lib 2021-02-27 14:12:39 +01:00
Griatch
773bbda113 Tweak search manager import for doc build 2021-02-27 13:57:58 +01:00
Griatch
10b09e2623 Fix typo in doc conf 2021-02-27 13:53:53 +01:00
Griatch
1a0ae18453 Fix doc conf build for multiversion 2021-02-27 13:48:11 +01:00
Griatch
23fa1862b2 Resolve merge conflict 2021-02-27 13:45:04 +01:00
Griatch
18be93f825 Update makefile from develop 2021-02-24 23:25:46 +01:00
Griatch
704c795812 Fix typo in conf 2021-02-24 23:20:13 +01:00
Griatch
3e4b8f5a3e Correct evpath variable 2021-02-24 23:16:41 +01:00
Griatch
72b3e18ee4 More debug output during doc build 2021-02-24 23:12:28 +01:00
Griatch
034b237c25 Another doc adjustment 2021-02-24 22:41:15 +01:00
Griatch
12e44167cb More tests for doc building 2021-02-24 22:35:04 +01:00
Griatch
1ab007a976 Start adding chargen 2021-02-24 22:32:54 +01:00
Griatch
4ba752ebd6
Merge pull request #2291 from tim-chaplin/fix_start_location
Fix settings.START_LOCATION behavior
2021-01-30 13:11:27 +01:00