Commit graph

21 commits

Author SHA1 Message Date
Griatch
bd9421d4b0 Implemented unittests for all default commands in a new and much faster way. 2013-05-12 19:53:19 +02:00
Griatch
4dff822764 Fixed bug in @batchcommand (Resolves Issue 287). Also updated @dig to again handle deleting ranges of dbrefs (with or without # in front). 2012-10-14 16:24:21 +02:00
Griatch
0b102bb07b Fixed @batchcommand access, automatically disabling procpool under SQLite3. 2012-09-27 20:51:06 +02:00
Griatch
b28d67534b Temporarily disabling procpool for @batchprocess to fix a traceback when building. 2012-09-26 08:34:54 +02:00
Griatch
ffcf4b3c2f Added cache-resyncing to ProcPool. This makes sure to update all affected object caches
whenever the subprocess returns (this is potentially not good enough for long-running scripts,
will have to ponder that one). Made ProcPool work with MySQL (where it works much better). Tested and fixed many
small bugs.
2012-09-03 01:11:14 +02:00
Griatch
575d7a86fa Made run_async also handle function calls through the ProcPool. 2012-09-02 16:54:07 +02:00
Griatch
f5a889e40c Added new process-pool runner based on AMPoule (integrated into Evennia).
This allows e.g. utils.utils.run_async to offload long-running functions
to a completely different subprocess entirely, offering real parallelism.

Implementation is still experimental, notably not all objects can be
transferred safely across the wire; also there is no concept of
updating caches yet - so adding an object from the subprocess side
will not be known in the main thread yet (since caches cannot yet tell
the underlying database has changed).
2012-09-02 10:10:22 +02:00
Griatch
9e2ad59663 Added a fix for running with postgresql-psycopg2. This does not actually resolve the problem as much as circumvent it, so I'm not marking Issue 115 as closed just yet. 2012-06-16 14:51:22 +02:00
Griatch
5f8cc5e3a6 Small fix to batchprocess output. 2012-06-12 21:03:30 +02:00
Griatch
8c3b49e704 Changed how the Typeclass system returns errors. Instead of echoing typeclass erros to the MUD-info channel (which is not only not only very spammy for everyone but also very hard to make clean so as to avoid recursion at a stage of typeclass failing), the system instead stores a property on itself called 'typeclass_last_errmsg' that holds eventual errors. This means that the task of reporting errors does not fall on the typeclass system itself but on the calling methods, as it should be. So src.utils.create.create_* functions now takes a new optional keyword "report_to" that holds an object to receive errors. If this keyword is given, the function msg():es that object with the error and returns None as before. If report_to is not set however, the create_* methods now return an Exception containing the error text. All default commands have been changed to accomodate for this behaviour, which allows for much more control over errors.
Also, the default ADMIN_MEDIA static files changed location in Django 1.4. The initial_setup function now accounts for this.
2012-04-21 16:15:37 +02:00
Griatch
0d01462077 Adding a new API system to Evennia. This centralizes all access of the evennia driver through a single module "ev". Importing ev one should be able to access (and also importantly, easily explore) Evennia's API much easier. This API goes a long way to "flatten" the structure so that one doesn't need to remember how to find some method in a deeply nested subdirectory.
As part of this work, I have also written full listings of all available properties on Typeclassed objects (including those inherited in various ways). Should hopefully make things easier to find.
One can of course still import things directly from src/ as before. But this is a first step towards removing the "base" objects in game/gamesrc and instead making those accessible through the core API.
2012-03-24 23:02:45 +01:00
Griatch
6aac9e6c2b Fixed permission on @batchcode command. 2012-03-21 11:46:15 +01:00
Griatch
1ca8df9e70 Fixed issues with batch-code processor not working correctly. Also added some better parsing. Resolves issue 221. 2012-03-20 22:29:37 +01:00
Griatch
f46a9a1280 Cropped @batchcommand output better. Resolves issue 217. 2012-03-14 21:03:28 +01:00
Griatch
8b5f3628ab Added info about creating the tutorial world to the Limbo desc. Also refactored some of the lock functions a bit for efficiency. 2012-02-06 21:48:50 +01:00
Griatch
95d672763b Multiple fixes and cleanups - command parser excludes inaccessible commands already at parse level now. Fixed the functionality of a few of the lock functions to be more intuitive. Added functionality to the examine command to better show the commands available to an object. 2011-06-26 14:35:02 +00:00
Griatch
334c0b1d08 Fixed a bunch of small issues. The RedButton example hasn't been working for a while, should be ok again now - also cleaned it up a bit. 2011-06-24 20:12:59 +00:00
Griatch
c81d238b0c Fixed a bug in batchcommand that caused crashes. Resolves issue 153. 2011-04-09 14:48:57 +00:00
Griatch
bccd84e480 Fixed some bugs in the access system. Changed the "owner" default permission to "control" instead to more general. Added a new hook for setting locks for objects (the suspicion was that this would give lots of grief to newbies otherwise, now we have a lockdown policy in the absence of lock definitions). 2011-03-17 21:43:18 +00:00
Griatch
08b3de9e5e OBS: You'll need to resync/rebuild your database!
- This implements an updated, clearer and more robust access system. The policy is now to lock that which is not explicitly left open.
- Permission strings -> Lock strings. Separating permissions and locks makes more sense security-wise
- No more permissiongroup table; permissions instead use a simple tuple PERMISSIONS_HIERARCHY to define an access hierarchy
- Cleaner lock-definition syntax, all based on function calls.
- New objects/players/channels get a default security policy during creation (set through typeclass)

As part of rebuilding and testing the new lock/permission system I got into testing and debugging several other systems, fixing some
outstanding issues:
- @reload now fully updates the database asynchronously. No need to reboot server when changing cmdsets
- Dozens of new test suites added for about 30 commands so far
- Help for channels made more clever and informative.
2011-03-15 16:08:32 +00:00
Griatch
72d40285b8 After lots of discussions, default commands where moved from game/gamesrc/commands/default to src/commands/default in order to make it clearer which parts are updated as part of evennia and which can be tweaked at heart's content. New templates where left in gamesrc/commands that should hopefully make it clearer how to extend the command system. Also game/web was moved to src/web - we'll likely extend this from game/gamesrc/web in the future. If you already did extensions you should just have to edit your import paths and make use of the new cmdset template supplied.
The unit testing was for commands was split out from src/objects/tests.py into the new src/commands/default/test.py in order to keep the testing modules thematically grouped with the things they are testing.
2010-11-23 01:24:56 +00:00
Renamed from game/gamesrc/commands/default/batchprocess.py (Browse further)