Commit graph

127 commits

Author SHA1 Message Date
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
275d00d4db Some more usability additions to the ProcPool system. Also made it default
to turned off when SQLite3 is used - SQLite3 doesn't support multiple
processes.
2012-09-02 18:57:25 +02:00
Griatch
575d7a86fa Made run_async also handle function calls through the ProcPool. 2012-09-02 16:54:07 +02:00
Griatch
e25ac1e46b Changed run_async to properly relay remote error messages to the user-supplied errback. 2012-09-02 16:14:08 +02:00
Griatch
056fee5c70 Changing all text files to explicitly have .txt endings. This helps online code browsers to properly identify the files. 2012-09-02 13:05:47 +02:00
Griatch
af99a80b4b Added procpool functionality for sending arbitrary data over the wire (including
nested databaseobjects). Rules are similar to Attribute saving.
Adding a missing component to the procpool setup.
2012-09-02 12:53:11 +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
dcc7f29a91 OBS: run migrations! This changes the Msg model to work with ManyToManyFields rather than with custom string representations for storing multiple receivers or channels. It also expands the Msg object with a "title" field and various filter options. This should make it easier to implement mail-like operations using the comms system. 2012-08-30 00:05:00 +02:00
Griatch
f68523cc22 Minor optimizations and some fixes to the dummyrunner. 2012-08-22 22:34:43 +02:00
Griatch
f5caab093e Fixed a spurious error messages from the location setter when logging out (need to check None location) 2012-08-19 21:36:01 +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
4c849ec351 Cleaned and updated the i18n strings for various server-core system. Removed i18n for all strings that are only visible on stdout or in logs. Still missing i18n on certain specific things such as model field help and attribute warnings. Updated Swedish translation to match. 2012-06-14 02:43:35 +02:00
Griatch
5f043d28d7 Minor cleanups of code. 2012-06-10 11:16:00 +02:00
Griatch
96e95ca525 Raised Python requirement to 2.6+. Some spurious work on the mdsp support. 2012-05-05 23:52:13 +02:00
Griatch
14ed95ebfe Removed with statement, it's not well supported (without future import) in python 2.5. 2012-05-04 09:20:30 +00:00
Griatch
c49fbd7d99 Removed 'with' statement; it's available in Python2.5, but one needs to use the future import to do that, so easiest to remove it. Resolves issue 230. 2012-05-04 10:03:41 +02:00
Griatch
4acfe48d9c Removed repetitive imports in the utils.create functions. I experimented with making these methods yield more, but it's hard to integrate this behaviour with actual production code. 2012-05-01 22:51:18 +02:00
Griatch
94477b8340 Updated the reload and shutdown mecanism to avoid a loop when shutting down from inside the game. Made sure to have server sync correctly with portal at @reload (some session info were lost before). Some other cleanups. 2012-05-01 14:19:54 +02:00
Griatch
e82515f8cb Updated to a supported idmapper version. Added a method for calculating the cache usage of the idmapper, and tied it to the @system command. 2012-04-30 00:51:36 +02:00
Griatch
1feb3a80a5 Some minor cleanups here and there. 2012-04-29 12:35:21 +02:00
Griatch
ed6def0c88 Made XTERM256 properly range between 0-5 (it was erroneously capped at 1-5 which mean the darkest values
of the colour cube were unreachable).
Fixed some issues with the lock caching.
2012-04-29 01:26:10 +02:00
Griatch
2dba8ad547 Changed attribute-caching to use a string as key rather than the attribute-object itself. The latter caused the database to be invoked in order to create the hash over and over. 2012-04-28 14:47:11 +02:00
Griatch
3091587e33 Added a timeout to the attribute caching; the system will now clean cache at regular intervals once it pass a certain size defined in settings. 2012-04-28 00:37:36 +02:00
Griatch
a8373c685f Some optimizations in one of the most expensive bits of the server, namely the command handler. 2012-04-25 18:47:03 +02:00
Griatch
3fba0bdbe3 Changed suggestion system to give more suggestions also if the help entry catches the exact match. 2012-04-22 21:54:28 +02:00
Griatch
0c292b5ff2 Changed how command not found errors are handled by default: Implemented a cos-likeness algorithm (Coling 2008) for comparing strings, which allows for decent suggestions and speed. 2012-04-22 16:36:31 +02:00
Griatch
4678234e9a Multiple fixes to ev and utils:
Made utils.variable_from_module more generic (it can now load pretty much any form of module it's given and also supports searching and returning multiple variables).

Removed the variable-load functionality from utils.load_module; this is now purely a loader - use variable_from_module instead.

I found out that one couldn't import from src.commands.default due to the __init__ file being restrictive for the sake of the ev API. Removed that and instead imported the default commands into ev.py with the help of utils.variable_from_module instead. Some more fixes in ev followed on this.
2012-04-22 12:23:42 +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
63329f5420 Added the ability to escape colour codes with \, So using \{g in a text will now result in '{g' being printed instead of the text switching to bright green. This can be useful for documentation. 2012-04-15 23:42:57 +02:00
Griatch
5a2228763f Fixed a lingering bug with @set that made it not work when assigning normal strings without quotes. Changed so that proper Python constructs (lists, dicts etc) now requires you to entering proper Python syntax (since this is parsed). 2012-04-15 23:09:56 +02:00
Griatch
464aa8ca9e Added the ability to clear an object from the global cache. This is rarely
needed (and can be potentially dangerous if the object depends on certain
startup methods to run and/or holds temporary attributes on themselves -
these will all be lost due to a new instance being created. It is hoever
necessary when it comes to renaming Exits - since the Command on the exit
must then change name too, recaching the Exit will also update the command.
Resolves issue 223.
2012-04-15 21:46:43 +02:00
Griatch
6501f30cbc Fixed an elusive bug in utils.get_variable_from_module() that caused the connection screen to sometimes not load properly, due to the imported modules being erroneously extracted and used. 2012-04-15 19:05:50 +02:00
Griatch
75cc8bf1ad Added an initial brainstorm for a more fully-featured tutorial multiplayer game "Battle for Evennia". The idea is to use this as a basis for a series of tutorials on building a relatively complete game in Evennia. The details will probably change, so putting it up for comments from the community. 2012-03-31 21:10:34 +02:00
Griatch
c0322c9eae Cleaning some unnecessary whitespace, overall cleanup of various source codes. 2012-03-30 23:47:22 +02:00
Griatch
e042366f31 Removed the conf/ modules, putting them into conf/examples instead, in line with other API changes. The gamesrc/ folder is now completely empty and all new modules have to be added explicitly. 2012-03-25 19:52:51 +02:00
Griatch
d3ea942ac8 Fixed tutorial_world to use ev API. 2012-03-25 17:39:45 +02:00
Griatch
b43fb3156a Added create_* and search_* helper methods directly in the API. 2012-03-25 17:01:27 +02:00
Griatch
4398d42360 Added new templates to gamesrc/*/examples. The old base* modules still in place. Some cleanup of the API. 2012-03-25 16:35:22 +02:00
Griatch
3408f3ca3f Added alternative function names to create module, for consistency with the search module. This means you can do create.objects() now too. 2012-03-25 14:01:51 +02:00
Griatch
88c0087fbd Updated game/ for the ev API. There will likely be some changes happening in the game/folder, in the way new objects are inherited. This should use the API rather than inherit from the basecommand/baseobject modules (these will probably into the example folders as vanilla templates instead). 2012-03-25 13:09:17 +02:00
Griatch
8350c7dca7 Added #INSERT capabilities to @batchcmd processor too. This allows to group and run multiple batch-cmd batchfiles from one central batchfile. You can not mix batchcmd and batchcode files however - that would go beyond the use cases for the respective batch processors (and give unnecessarily complex code for little gain). 2012-03-21 10:24:49 +01:00
Griatch
8b99b8a130 Added #INSERT parameter for batch-code processor. This should resolve the issue of wanting to combine several batch files. Also improved traceback feedback from the batch-code processor. 2012-03-21 01:53:33 +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
5beee55149 Added ability of @set command to actually store real Python types, not just strings. 2012-03-13 23:56:19 +01:00
Griatch
24c4791e9e Fixed a bug with the updating of the caching. 2012-02-26 01:10:20 +01:00
Griatch
1fa5791e19 Added aggressive caching for common typeclassed variables. 2012-02-25 23:37:50 +01:00
Griatch
a0a205c945 Did some additions to the MSDP implementation. Added a first test for implementing MSDP commands, but it is not working yet. 2012-02-25 21:14:48 +01:00
Griatch
ab2ba19782 Fixed critical typo in instructions for dummyrunner. 2012-02-22 15:15:32 +01:00
Griatch
fd857f5c86 Expanded the dummy runner, making it more realistically mimicking real Players by spreading out its access usage. 2012-02-22 12:44:51 +01:00
Griatch
a923a9a061 Merging fixes from clone jeremywosborne-evennia-patch. Closes merge request issue 211. Thanks! 2012-02-21 08:27:30 +01:00